#include <stdio.h>

int a, b, n1, n2, n3, n4, n5;

int main(void) {
    scanf("%d%d", &a, &b);
    n1 = a + b;
    n2 = a - b;
    n3 = a * b;
    n4 = a / b;
    n5 = a % b;
    printf("%d %d %d %d %d", n1, n2, n3, n4, n5);
    return 0;
}
